//392.判断子序列
//https://leetcode.cn/problems/is-subsequence/
class Solution {
public:
    bool isSubsequence(string s, string t) {
        int sn = s.size();
        int tn = t.size();

        int i = 0, k = 0;
        while (i < sn && k < tn) if (s[i] == t[k++]) ++i;
        return i == sn;
    }
};